package fr.uniscol.dao.impl;

import org.hibernate.SessionFactory;
import org.hibernate.classic.Session;

import fr.uniscol.dao.IEtablissementDao;
import fr.uniscol.model.Etablissement;

public class EtablissementDaoImpl implements IEtablissementDao {

	private SessionFactory sessionFactory;
	
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	public Etablissement getEtablissement(String uai) {
		return null;
	}

	public void enregistrerEtablissement(Etablissement etablissement) {
		
		Session session = sessionFactory.getCurrentSession();
		
		session.saveOrUpdate(etablissement);
	}
}
